//
//  ImgHandler.m
//  gdemm
//
//  Created by 乔明超 on 16/5/5.
//  Copyright © 2016年 Goldencis. All rights reserved.
//

#import "ImgHandler.h"
#import "ImgFileController.h"
@implementation ImgHandler
- (BOOL)isSupportedType:(NSString *)suffix{
    
    return  [suffix caseInsensitiveCompare:@"jpg"]  == NSOrderedSame ||
            [suffix caseInsensitiveCompare:@"png"]  == NSOrderedSame ||
            [suffix caseInsensitiveCompare:@"jpeg"] == NSOrderedSame ||
            [suffix caseInsensitiveCompare:@"gif"] == NSOrderedSame ||
            [suffix caseInsensitiveCompare:@"bmp"]  == NSOrderedSame;
    
    
}
- (UIViewController *)getControllerForFilePath:(NSString *)filePath{
    NSString *path = [self getDecryptedPath:filePath];
    if (path == nil) {
        return nil;
    }
    ImgFileController  *imgVc = [[ImgFileController alloc]init];
    imgVc.path = path;
    return imgVc;
}

- (NSString *)getIconWithFileName:(NSString *)fileName enced:(BOOL)isEnced{
    NSString *icon;
    icon = isEnced ? @"cloudDisk_icon_picture_enced" : @"cloudDisk_icon_picture";
    return icon;
}
@end
